package cvo.pro4.chess.client.entities;

public class Player {

	private int id;
	private String name;
	private int rank;
	private int score;
	private Army army;
	
	public Player(int ID, String name, int rank, int score) {
		this.id = ID;
		this.name = name;
		this.rank = rank;
		this.score = score;
	}

	public int getID() {
		return id;
	}

	public void setID(int ID) {
		this.id = ID;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getRank() {
		return rank;
	}

	public void setRank(int rank) {
		this.rank = rank;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}
	
	
	
	public Army getArmy() {
		return army;
	}

	public void setArmy(Army army) {
		this.army = army;
	}

	@Override
	public boolean equals(Object other){
		if(other instanceof Player){
			Player otherPlayer = (Player) other;
			if(otherPlayer.getID() == this.id){
				return true;
			}
		}
		return false;
	}
	
}